package com.gitee.kamismile.stone.basic.data.domain.sysRole.repository.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

import java.util.Date;
import java.util.Objects;

@Table(name = "sys_role")
public class SysRole {
    @Id
    private Integer nSysRoleId;
    private String sName;
    private String sGrade;
    private String sDesc;
    private Integer nTenantId;
    private Integer nCreateBy;
    private Integer nUpdateBy;
    private Date dCreateTime;
    private Date dUpdateTime;

    public Integer getnSysRoleId() {
        return nSysRoleId;
    }

    public void setnSysRoleId(Integer nSysRoleId) {
        this.nSysRoleId = nSysRoleId;
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public String getsGrade() {
        return sGrade;
    }

    public void setsGrade(String sGrade) {
        this.sGrade = sGrade;
    }

    public String getsDesc() {
        return sDesc;
    }

    public void setsDesc(String sDesc) {
        this.sDesc = sDesc;
    }

    public Integer getnTenantId() {
        return nTenantId;
    }

    public void setnTenantId(Integer nTenantId) {
        this.nTenantId = nTenantId;
    }

    public Integer getnCreateBy() {
        return nCreateBy;
    }

    public void setnCreateBy(Integer nCreateBy) {
        this.nCreateBy = nCreateBy;
    }

    public Integer getnUpdateBy() {
        return nUpdateBy;
    }

    public void setnUpdateBy(Integer nUpdateBy) {
        this.nUpdateBy = nUpdateBy;
    }

    public Date getdCreateTime() {
        return dCreateTime;
    }

    public void setdCreateTime(Date dCreateTime) {
        this.dCreateTime = dCreateTime;
    }

    public Date getdUpdateTime() {
        return dUpdateTime;
    }

    public void setdUpdateTime(Date dUpdateTime) {
        this.dUpdateTime = dUpdateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysRole sysRole = (SysRole) o;
        return Objects.equals(nSysRoleId, sysRole.nSysRoleId) && Objects.equals(sName, sysRole.sName) && Objects.equals(sGrade, sysRole.sGrade) && Objects.equals(sDesc, sysRole.sDesc) && Objects.equals(nTenantId, sysRole.nTenantId) && Objects.equals(nCreateBy, sysRole.nCreateBy) && Objects.equals(nUpdateBy, sysRole.nUpdateBy) && Objects.equals(dCreateTime, sysRole.dCreateTime) && Objects.equals(dUpdateTime, sysRole.dUpdateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(nSysRoleId, sName, sGrade, sDesc, nTenantId, nCreateBy, nUpdateBy, dCreateTime, dUpdateTime);
    }
}
